package com.bh.wms.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.BhtmsBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 仓储库存
 *
 * @author GPT
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("wms_inventory")
@ApiModel(value = "库存记录", description = "仓库库存记录")
public class WmsInventory extends BhtmsBaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("仓库ID")
    @Excel(name = "仓库ID")
    private Long warehouseId;

    @ApiModelProperty("库区ID")
    @Excel(name = "库区ID")
    private Long zoneId;

    @ApiModelProperty("货位ID")
    @Excel(name = "货位ID")
    private Long locationId;

    @ApiModelProperty("SKU ID")
    @Excel(name = "SKU ID")
    private Long skuId;

    @ApiModelProperty("批次号")
    @Excel(name = "批次号")
    private String batchNo;

    @ApiModelProperty("序列号")
    @Excel(name = "序列号")
    private String serialNo;

    @ApiModelProperty("生产日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    @ApiModelProperty("失效日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "失效日期", dateFormat = "yyyy-MM-dd")
    private Date expireDate;

    @ApiModelProperty("库存状态")
    @Excel(name = "库存状态")
    private String inventoryStatus;

    @ApiModelProperty("库存数量")
    @Excel(name = "库存数量")
    private BigDecimal quantity;

    @ApiModelProperty("锁定数量")
    @Excel(name = "锁定数量")
    private BigDecimal lockedQuantity;

    @ApiModelProperty("预留数量")
    @Excel(name = "预留数量")
    private BigDecimal reservedQuantity;

    @ApiModelProperty("在途数量")
    @Excel(name = "在途数量")
    private BigDecimal transitQuantity;

    @ApiModelProperty("货主")
    @Excel(name = "货主")
    private Long ownerId;

    @ApiModelProperty("成本单价")
    @Excel(name = "成本单价")
    private BigDecimal costPrice;

    @ApiModelProperty("扩展字段1")
    private String extendOne;

    @ApiModelProperty("扩展字段2")
    private String extendTwo;

    @ApiModelProperty("扩展字段3")
    private String extendThree;
}

